package im.route.api.constants;

import java.math.BigDecimal;

public class SystemConstant {

    public static final String REPAY_CARD_NO = "repay.card.no"; //400000000014735

    //add yixin entrusted payment account for car return
    public static final String YIXIN_ENTRUSTED_PAYMENT_ACCOUNT = "yixin.entrusted.payment.account";
    public static final String SHYX_ENTRUSTED_PAYMENT_ACCOUNT = "shyx.entrusted.payment.account";
    public static final String LOV_TYPE_ENTRUSTED_PAYMENT_ACCOUNT = "entrusted.payment.account";
    public static final String LOV_SUB_TYPE_ENTRUSTED_PAYMENT_ACCOUNT = "entrusted.payment.account";
    //add compensation account for high risk buyback
    public static final String LOV_TYPE_COMPENSATION_ACCOUNT = "compensation.account";
    public static final String LOV_SUB_TYPE_COMPENSATION_ACCOUNT = "compensation.account";
    
    //add car return payment type
    public static final String CAR_RETURN_PAYMENT_TYPE = "7";
    public static final String CAR_RETURN_REPAYMENT_CODE = "5";
    public static final String HIGH_RISK_BUYBACK_PAYMENT_TYPE = "6";
    // Logger
    public static final String REQUEST_LOG_ID = "requestId";
    public static final String SUB_REQUEST_LOG_ID = "subRequestId";

    // Retry
    public static final String RETRY_MAX_ATTEMPTS = "retry.max.attempts";
    public static final String RETRY_DELAY = "retry.delay";
    public static final String CONTEXT_NAME = "context.name";

    // Async
    public static final String ASYNC_CORE_POOL_SIZE = "async.core.pool.size";
    public static final String ASYNC_MAX_POOL_SIZE = "async.max.pool.size";
    public static final String ASYNC_QUEUE_CAPACITY = "async.queue.capacity";
    public static final String ASYNC_CUSTOMER_CORE_POOL_SIZE = "async.customer.core.pool.size";
    public static final String ASYNC_CUSTOMER_MAX_POOL_SIZE = "async.customer.max.pool.size";
    public static final String ASYNC_CUSTOMER_QUEUE_CAPACITY = "async.customer.queue.capacity";
    public static final String ASYNC_REPAYMENT_CORE_POOL_SIZE = "async.repayment.core.pool.size";
    public static final String ASYNC_REPAYMENT_MAX_POOL_SIZE = "async.repayment.max.pool.size";
    public static final String ASYNC_REPAYMENT_QUEUE_CAPACITY = "async.repayment.queue.capacity";

    //email active repayment report in 10 days
    public static final String ACTIVE_PEPAYMENT_REPORT_FROM = "active.repayment.report.from";
    public static final String ACTIVE_PEPAYMENT_REPORT_TO = "active.repayment.report.to";
    public static final String ACTIVE_PEPAYMENT_TEMP_DIR = "active.repayment.temp.dir";


    public static final String CAR_RETURN_EMAIL_FROM = "car.return.email.from";
    public static final String CAR_RETURN_EMAIL_TO = "car.return.email.to";
    public static final String HIGH_RISK_BUYBACK_EMAIL_FROM = "high.risk.buyback.email.from";
    public static final String HIGH_RISK_BUYBACK_EMAIL_TO = "high.risk.buyback.email.to";

    // email incident
    public static final String INCIDENT_EMAIL_FROM = "incident.email.from";
    public static final String INCIDENT_EMAIL_TO = "incident.email.to";
    public static final String INCIDENT_EMAIL_SUBJECT = "incident.email.subject";
    public static final String INCIDENT_EMAIL_CONTENT = "incident.email.content";
    public static final String INCIDENT_EMAIL_KEY_SYSTEM_NAME = "systemName";
    public static final String INCIDENT_EMAIL_KEY_FUNCTION_NAME = "functionName";
    public static final String INCIDENT_EMAIL_KEY_URL_KIBANA = "urlKibana";
    public static final String INCIDENT_EMAIL_KEY_INTERFACE_NAME = "interfaceName";
    public static final String INCIDENT_EMAIL_KEY_REQUEST_LOG_ID = "requestLogId";
    public static final String INCIDENT_EMAIL_KEY_SUB_REQUEST_LOG_ID = "subRequestLogId";
    public static final String INCIDENT_EMAIL_KEY_APPLY_NO = "applyNo";
    public static final String INCIDENT_EMAIL_KEY_ERROR_MSG = "errorMsg";
    public static final String SYSTEM_NAME_IM = "Integration Module";
    public static final String SYSTEM_NAME_PAOC = "PAOC";
    public static final String SYSTEM_NAME_CUPD = "CUPD";
    public static final String SYSTEM_NAME_FLEXCUBE = "Flexcube";
    public static final String SYSTEM_NAME_SMS = "SMS";
    public static final String URL_KIBANA = "url.kibana";


    // collateral code running no
    public static final String STARTING_COLLATERAL_CODE = "starting.collateral.code";

    // sub line code running no
    public static final String STARTING_SUBLINE_CODE = "starting.subline.code";

    public static final BigDecimal INTERVAL_RATE = BigDecimal.valueOf(30L);
    public static final BigDecimal TOTAL_DAY_IN_YEAR = BigDecimal.valueOf(360L);
    public static final BigDecimal START_IRR_RATE = BigDecimal.valueOf(50L);
    public static final String IRR_PRECISION = "Irr.precision";
    public static final String IRR_FORMULA_NAME = "Calculate IRR form installments by using bisection algorithm";
    public static final Integer MAX_ITERATORS = 1000;

    public static final String SYSTEM_CODE_COMMON = "COMMON";
    public static final String ACTIVE_STATUS = "A";
    public static final String INACTIVE_STATUS = "I";
    public static final String SEND_EMAIL_FLAG_YES = "Y";
    public static final String SEND_EMAIL_FLAG_NO = "N";

    public static final String SYSTEM_DATE = "system.date";
    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";

    // check existing customer
    public static final String EXISTING_CUSTOMER_STATUS = "existing.customer.status";
    public static final String SUB_EXISTING_CUSTOMER_STATUS = "existing.customer.status";
    public static final String TYPE_OF_CERTIFICATE = "type.of.certificate";
    public static final String SUBTYPE_OF_CERTIFICATE = "type.of.certificate";
    public static final String EXISTING_CUSTOMER_YES = "Y";
    public static final String EXISTING_CUSTOMER_NO = "N";
    public static final String EXISTING_CUSTOMER_ERROR = "E";

    // Daily Disbursement Info
    public static final String FLEXCUBE_DAILY_DISBURSEMENT = "flexcube.daily.disbursement";
    public static final String DAILY_DISBURSEMENT_SQL_PARAM = "daily.disbursement.sql.param";
    public static final String DAILY_DISBURSEMENT_SQL_PARAM_MODULE_CODE = "moduleCode";
    public static final String DAILY_DISBURSEMENT_SQL_PARAM_PRODUCT_CODE = "productCode";
    public static final String DAILY_DISBURSEMENT_SQL_PARAM_CERT_TYPE = "certType";
    public static final String DAILY_DISBURSEMENT_EXECUTE_TIME = "flexcube.daily.disbursement.execute.time";
    public static final String DAILY_DISBURSEMENT_EXECUTE_DATE = "flexcube.daily.disbursement.execute.date";
    public static final String DAILY_DISBURSEMENT_EXPORT_PATH = "flexcube.daily.disbursement.export.path";
    public static final String DAILY_DISBURSEMENT_WRITE_FILE_SUCCESS = "S";
    public static final String DAILY_DISBURSEMENT_WRITE_FILE_ERROR = "E";
    public static final String DAILY_DISBURSEMENT_FILE_NAME = "flexcube.daily.disbursement.export.filename";

    // Error Code Check Existing Customer for RiskEngine
    public static final String CHECK_EXISTING_CUSTOMER = "RiskEngine";
    public static final String ERROR_QUERY_FCUBE_EXISTING_CUSTOMER = "RiskEngine001";
    public static final String ERROR_NO_INPUT_REQUEST = "RiskEngine002";
    public static final String ERROR_MAPPING_CERTIFICATE_TYPE = "RiskEngine003";
    public static final String ERROR_MAPPING_FCUBE_DEFINED_STATUS = "RiskEngine004";

    // Step name
    public static final String STEP_CODE_RECEIVE_PUSHING_LOAN_REQ_PAOC = "0001";
    public static final String STEP_CODE_RECEIVE_CUSTOMER_INFO_CUPD = "0002";
    public static final String STEP_CODE_RECEIVE_ACK_CUSTOMER_INFO_CUPD = "0003";
    public static final String STEP_CODE_CREATE_CUSTOMER = "0004";
    public static final String STEP_CODE_CREATE_LIABILITY = "0005";
    public static final String STEP_CODE_CREATE_LINK_CUST_LIAB = "0006";
    public static final String STEP_CODE_CREATE_COLLATERAL = "0007";
    public static final String STEP_CODE_CREATE_FACILITY_LV1 = "0008";
    public static final String STEP_CODE_CREATE_FACILITY_LV2 = "0009";
    public static final String STEP_CODE_CREATE_LOAN_ACC = "0010";
    public static final String STEP_CODE_CREATE_LOAN_DIS = "0011";
    public static final String STEP_CODE_SEND_LOAN_SMS = "0012";
    public static final String STEP_CODE_UPDATE_STATUS_LOAN_DIS_SUCCESS_PAOC = "0013";
    public static final String STEP_CODE_RECEIVE_REPAYMENT_PAOC = "0014";
    public static final String STEP_CODE_DEDUCTION_WAITING_STATUS = "0015";
    public static final String STEP_CODE_DEDUCTION_SUCCESS = "0016";
    public static final String STEP_CODE_REPAYMENT = "0017";
    public static final String STEP_CODE_SEND_REPAYMENT_SMS = "0018";
    public static final String STEP_CODE_UPDATE_STATUS_REPAYMENT_SUCCESS_PAOC = "0019";
    public static final String STEP_CODE_CLOSE_FACILITY_LV2 = "0020";
    public static final String STEP_CODE_CLOSE_COLLATERAL_POOL = "0021";
    public static final String STEP_CODE_CLOSE_COLLATERAL = "0022";
    public static final String STEP_CODE_CLOSE_LINK_CUST_LIAB = "0023";
    public static final String STEP_CODE_CLOSE_LIABILITY = "0024";
    public static final String STEP_CODE_CLOSE_CUSTOMER = "0025";
    public static final String STEP_CODE_UPDATE_STATUS_REPAYMENT_FAIL_PAOC = "0026";
    public static final String STEP_CODE_UPDATE_STATUS_LOAN_DIS_FAIL_PAOC = "0027";
    public static final String STEP_CODE_PREPARE_DATA_TO_CLOSE_PROCESS = "0028";
    public static final String STEP_CODE_CLOSE_FACILITY_LV1 = "0029";
    public static final String STEP_CODE_SEND_ACTIVE_REPAYMENT_SMS = "0030";
    public static final String STEP_CODE_SEND_LIQUIDATED_SMS = "0031";


    // FLEXCUBE
    public static final String FLEXCUBE_ENDPOINT_FCUBS_CF_SERVICE = "flexcube.endpoint.fcubs.cf.service";
    public static final String FLEXCUBE_ENDPOINT_FCUBS_CUSTOMER_SERVICE = "flexcube.endpoint.fcubs.customer.service";
    public static final String FLEXCUBE_ENDPOINT_EL_LIABILITY_SERVICE = "flexcube.endpoint.el.liability.service";
    public static final String FLEXCUBE_ENDPOINT_EL_CUST_LIAB_SERVICE = "flexcube.endpoint.el.cust.liab.service";
    public static final String FLEXCUBE_ENDPOINT_EL_COLLATERAL_SERVICE = "flexcube.endpoint.el.collteral.service";
    public static final String FLEXCUBE_ENDPOINT_EL_POOL_SERVICE = "flexcube.endpoint.el.pool.service";
    public static final String FLEXCUBE_ENDPOINT_EL_FACILITY_SERVICE = "flexcube.endpoint.el.facility.service";
    public static final String FLEXCUBE_ENDPOINT_FCUBS_CL_SERVICE = "flexcube.endpoint.fcubs.cl.service";
    public static final String FLEXCUBE_ENDPOINT_FCUBS_CLC_SERVICE = "flexcube.endpoint.fcubs.clc.service";
    public static final String FLEXCUBE_ENDPOINT_FCUBS_ELCM_CUSTOM_SERVICE = "flexcube.endpoint.fcubs.elcm.custom.service";

    // PAOC
    public static final String PAOC_ENDPOINT = "paoc.endpoint";
    public static final String PAOC_HEADER_REQ_CHANNEL_NO = "paoc.header.req.channel.no";
    public static final String PAOC_HEADER_RSP_CHANNEL_NO = "paoc.header.rsp.channel.no";
    public static final String PAOC_HEADER_REQ_TIME_FORMAT = "paoc.header.req.time.format";

    // CUPD
    public static final String CUPD_ENDPOINT_DEDUCTION_IP_ADDRESS = "cupd.endpoint.deduction.ip.address";
    public static final String CUPD_ENDPOINT_DEDUCTION_PORT = "cupd.endpoint.deduction.port";
    public static final String CUPD_ENDPOINT_CUSTOMER_INFO = "cupd.endpoint.customer.info";
    public static final String CUPD_DEDUCTION_HEADER_MERCH_ID = "cupd.deduction.header.merch.id";
    public static final String CUPD_DEDUCTION_BODY_PAYEE_CARD_NO = "cupd.deduction.body.payee.card.no";
    public static final String CUPD_DEDUCTION_BODY_PAYEE_NAME = "cupd.deduction.body.payee.name";
    public static final String CUPD_ENDPOINT_QUERY_DEDUCTION_IP_ADDRESS = "cupd.endpoint.deduction.ip.address";
    public static final String CUPD_ENDPOINT_QUERY_DEDUCTION_PORT = "cupd.endpoint.deduction.port";
    public static final String CUPD_SERVICE_ID_CUSTOMER_INFO = "cupd.service.id.customer.info";
    public static final String CUPD_ENDPOINT_SOCKET_TIMEOUT = "cupd.endpoint.socket.timeout";

    // SMS
    public static final String SMS_ENDPOINT = "sms.endpoint";
    public static final String SMS_TEMPLATE_LOAN = "loan";
    public static final String SMS_TEMPLATE_AFTER_REPAYMENT = "after-repayment";
    public static final String SMS_TEMPLATE_REQUEST_PAYOFF = "request-payoff";

    // Deduction
    public static final String CUPD_DEDUCTION_DELAY = "cupd.deduction.delay";
    public static final String CUPD_DEDUCTION_MAX_ATTEMPTS = "cupd.deduction.max.attempts";
    public static final String REPAYMENT_TYPE_AUTO = "01";
    public static final String REPAYMENT_TYPE_ACTIVE = "02";
    public static final String PAYOFF_EMAIL_FROM = "payoff.email.from";
    public static final String PAYOFF_EMAIL_TO = "payoff.email.to";
    public static final String PAYOFF_EMAIL_SUBJECT = "payoff.email.subject";
    public static final String PAYOFF_EMAIL_CONTENT = "payoff.email.content";

    public static final String LOV_TYPE_LOAN_TERM = "loan.term";
    public static final String LOV_SUB_TYPE_LOAN_TERM_MIN = "minimum.loan.term";
    public static final String LOV_GROUP_LOAN_TERM_MIN_MONTH = "month";
    public static final String LOV_TYPE_LPR_TERM = "lpr.term";
    public static final String LOV_SUB_TYPE_LPR_TERM_MONTH_YEAR = "month.to.year";
    public static final String LOV_GROUP_LPR_TERM_MONTH_YEAR_NOT_FOUND = "-1";

    public static final String LOV_TYPE_SMS_TEMPLATE = "sms.template";
    public static final String LOV_SUB_TYPE_SMS_LOAN_DISBURSEMENT = "loan.disbursement";
    public static final String LOV_SUB_TYPE_SMS_LOAN_REPAYMENT_SUCCESS = "loan.repayment.success";
    public static final String LOV_SUB_TYPE_SMS_LOAN_REPAYMENT_FAIL = "loan.repayment.fail";
    public static final String LOV_SUB_TYPE_SMS_LOAN_REQUEST_PAYOFF = "loan.request.payoff";
    public static final String LOV_CODE_TEMPLATE_ID = "templateId";
    public static final String LOV_SUB_TYPE_SMS_SYSTEM_CODE = "CUP CAR LOAN_YIXIN";

    // Daily Repayment
    public static final String DAILY_REPAYMENT_UPLOAD_FILE = "daily.repayment.upload.file";
    public static final String DAILY_REPAYMENT_SQL_PARAM = "daily.repayment.sql.param";
    public static final String DAILY_REPAYMENT_SQL_PARAM_BRANCH_AND_PRODUCT_CODE = "branchAndProductCode";
    public static final String DAILY_REPAYMENT_FILE_NAME = "daily.repayment.file.name";
    public static final String DAILY_REPAYMENT_FILE_NAME_PAY_PLAN = "payPlan";
    public static final String DAILY_REPAYMENT_FILE_NAME_PAY_DETAIL = "payDetail";
    public static final String DAILY_REPAYMENT_FILE_NAME_LOAN_INFO = "loanInfo";
    public static final String PAOC_DAILY_REPAYMENT_UPLOAD_PATH = "paoc.daily.repayment.upload.path";

    //for sync yixin and paoc
    //Locally temporarily store files
    public static final String DAILY_END_DOWNLOAD_PATH = "daily.end.download.path";
    public static final String DAILY_END_ARCHIVE_PATH = "daily.end.archive.path";
    public static final String YIXIN_DAILY_END_LOCAL_PATH = "yixin.daily.end.local.path";
    public static final String SHYX_DAILY_END_LOCAL_PATH = "shyx.daily.end.local.path";
    //upload the zip file to sftp
    public static final String YIXIN_DAILY_END_UPLOAD_PATH = "yixin.daily.end.upload.path";
    public static final String SHYX_DAILY_END_UPLOAD_PATH = "shyx.daily.end.upload.path";
    //profitSharing file
    public static final String COMPENSATION_FILENAME = "compensation";
    //profitRatio
    public static final String LOV_TYPE_CHANNEL_CONFIGURATION = "channel.configuration";
    public static final String LOV_SUB_TYPE_SECOND_HAND_CAR_RATIO = "second.hand.car.ratio";
    public static final String LOV_SUB_TYPE_NEW_CAR_RATIO = "new.car.ratio";
    public static final String SECOND_HAND_CAR_PRODUCT_TYPE = "11";
    //Current status of repayment schedule---04:settle
    public static final String SETTLE_STATUS = "04";
    public static final String YIXIN_MANAGER_ORG = "0003";
    public static final String SHYX_MANAGER_ORG = "0002";
    public static final String PRODUCT_CODE = "IL01";
    public static final String LOAN_TERM_FLAG = "月";


    //deduction
    public static final String DEDUCTION_FILENAME = "deduction";
    //deduction
    public static final String OVERDUE_FILENAME = "overdue";

    // Mail
    public static final String INTEGRATION_API_EMAIL_FROM = "integration.api.email.from";
    public static final String INTEGRATION_API_EMAIL_TO = "integration.api.email.to";
    //add email for sending profit sharing report and repaymet report
    public static final String PROFIT_SHARING_REPORT_EMAIL_FROM = "profit.sharing.report.email.from";
    public static final String PROFIT_SHARING_REPORT_EMAIL_TO = "profit.sharing.report.email.to";
    public static final String REPAYMENT_REPORT_EMAIL_FROM = "repayment.report.email.from";
    public static final String REPAYMENT_REPORT_EMAIL_TO = "repayment.report.email.to";

    // Flexcube File
    public static final String FLEXCUBE_FILE_DATE_FORMAT = "yyyyMMdd";
    public static final String FLEXCUBE_SOURCE_REMOTE_REPAYMENT_LOCATION = "flexcube.source.remote.repayment.location";
    public static final String FLEXCUBE_AUTO_REPAYMENT_PATH = "flexcube.auto.repayment.path";
    public static final String FLEXCUBE_AUTO_REPAYMENT_ARCHIVE_PATH = "flexcube.auto.repayment.archive.path";
    public static final String PAOC_DAILY_REPAYMENT_ARCHIVE_PATH = "paoc.daily.repayment.archive.path";

    public static final String FLEXCUBE_SOURCE_REMOTE_LOANINFO_LOCATION = "flexcube.source.remote.loaninfo.location";
    public static final String FLEXCUBE_SOURCE_REMOTE_PAYDETAIL_LOCATION = "flexcube.source.remote.paydetail.location";
    public static final String FLEXCUBE_SOURCE_REMOTE_PAYPLAN_LOCATION = "flexcube.source.remote.payplan.location";
    public static final String FLEXCUBE_AUTO_REPAYMENT_FILE = "flexcube.auto.repayment.file";
    public static final String FLEXCUBE_AUTO_REPAYMENT_FILE_NAME = "flexcube.auto.repayment.file.name";
    public static final String AUTO_REPAYMENT_FILENAME = "autoRepaymentFilename";
    public static final String LOAN_INFO_FILENAME = "loanInfo";
    public static final String PAY_DETAIL_FILENAME = "payDetail";
    public static final String PAY_PLAN_FILENAME = "payPlan";

    // running key
    public static final String RUNNING_CUPD_HEADER = "cupd_header";

    // flexcube sftp config
    public static final String FLEXCUBE_EXTERNAL_SFTP_HOST = "flexcube.external.sftp.host";
    public static final String FLEXCUBE_EXTERNAL_SFTP_PORT = "flexcube.external.sftp.port";
    public static final String FLEXCUBE_EXTERNAL_SFTP_USERNAME = "flexcube.external.sftp.username";
    public static final String FLEXCUBE_EXTERNAL_SFTP_PASSWORD = "flexcube.external.sftp.password";
    public static final String FLEXCUBE_EXTERNAL_SFTP_LOCAL_DIRECTORY = "flexcube.external.sftp.local.directory";
    
    // loan contract sftp config
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_HOST = "external.loan.contract.sftp.host";
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_PORT = "external.loan.contract.sftp.port";
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_USERNAME = "external.loan.contract.sftp.username";
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_PASSWORD = "external.loan.contract.sftp.password";
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_REMOTE_FILE_PATTERN = "external.loan.contract.sftp.remote.file.pattern";
    public static final String LOAN_CONTRACT_EXTERNAL_SFTP_LOCAL_DIRECTORY = "external.loan.contract.sftp.local.directory";
    
    public static final String REQUEST_REPAYMENT_API_ID = "300070";
    
    public static final String REQUEST_HEADER_NAME_CHANNEL_NO = "req_channel_no";
    public static final String REQUEST_HEADER_NAME_CHANNEL_ID = "CHANNEL_ID";

    
}
